﻿@model ProjectDeal.Models.KhachHang

@{
    ViewBag.Title = "Đăng ký tài khoản";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

@section header{
    <title>Đăng ký</title>
    <script src="../../Scripts/validate/jquery.validate.js"></script>
    <script src="../../Scripts/validate/jquery.validate.min.js"></script>
    <script src="../../Scripts/ValidateControl/validateDangky.js"></script>
}
<style>
    label.error
{
    display: block;
    color: #D44D24 !important;
    font-size: 13px !important;
    width: 60% !important;
    margin-top: 1px;
    padding: 0 !important;
}
</style>


<div class="container-2" style="background:none">
                	<section class="content" style="margin-bottom: 25px;margin-left: 100px;">
                    	<h2>Đăng Ký &nbsp;<small>Thông Tin Có * Bắt Buộc Phải Nhập.</small></h2>
                       @using (Html.BeginForm("DangKy", "KhachHang", FormMethod.Post, new { @class = "form-register", @id = "contact", enctype = "multipart/form-data" }))
                       {
                           <h3>Thông Tin Tài Khoản</h3>
                        <div class="registerbox">
                          <fieldset>
                            <div class="control-group">
                              <label class="control-label"><span class="red">*</span> Email:</label>
                              <div class="controls">
                                  @Html.TextBoxFor(mbox=>mbox.Email,new{@class="email"})
                                  <label for="Name" id="NameError" class="error" generated="true" style="display:none;" ></label>	

                              </div>
                            </div>
                            <div class="control-group">
                              <label class="control-label"><span class="red">*</span> Mật Khẩu:</label>
                              <div class="controls">
                                  @Html.Password("MatKhau")
                              </div>
                            </div>
                            <div class="control-group">
                              <label class="control-label"><span class="red">*</span> Xác Nhận Mật Khẩu:</label>
                              <div class="controls">
                                   @Html.Password("CPassword","")
                              </div>
                            </div>
                            <div class="control-group">
                              <label class="control-label"><span class="red">*</span> Ngày Sinh:</label>
                              <div class="controls">
                                @Html.TextBoxFor(m=>m.NgaySinh)
                              </div>
                            </div>
                            <div class="control-group">
                              <label for="select01" class="control-label">
                              Giới Tính:</label>
                              <div class="controls">
                                @Html.DropDownListFor(m => m.GioiTinh,
		                        new SelectList(ProjectDeal.Controllers.KhachHangController.GetList_Gender(),
			                        "GenderID", "GenderName"),
			                        "Chọn giới tính")
                                <label for="GioiTinh" class="error" generated="true" style="margin-left: 210px;" ></label>	
                             
                              </div>
                            </div>
                          </fieldset>
                        </div>

                        <h3>Thông Tin Giao Hàng</h3>
                        <div class="registerbox">
                          <fieldset>
                            <div class="control-group">
                              <label class="control-label"><span class="red">*</span> Họ Tên:</label>
                              <div class="controls">
                       
                                  @Html.TextBoxFor(m=>m.HoTen)
                              </div>
                                </div>
                            <div class="control-group">
                              <label for="select01" class="control-label">
                               Tỉnh/Thành Phố:</label>
                              <div class="controls">
                                  @Html.DropDownListFor(m=>m.ThanhPho,
                                  new SelectList(ViewData["TinhThanh"] as IEnumerable<ProjectDeal.Models.TinhThanh>,"MaTinhThanh","TenTinhThanh"),"Chọn tỉnh thành")
                               <label for="ThanhPho" class="error" generated="true" style="margin-left: 210px;" ></label>	
                              </div>
                            </div>
                              
                            <div class="control-group" id="resultJSON"></div>
                            <div class="control-group">
                              <label for="select01" class="control-label">
                              Quận/Huyện:</label>
                              <div class="controls">
                                  
                               @Html.DropDownListFor(m=>m.Quan,new SelectList(ViewData["QuanHuyen"] as IEnumerable<ProjectDeal.Models.QuanHuyen>,"MaQuanHuyen","TenQuanHuyen"),"Chọn quận huyện")
                              </div>
                            </div>
                            <div class="control-group">
                              <label for="select01" class="control-label">Phường/Xã:</label>
                              <div class="controls">
                                 @Html.DropDownListFor(m=>m.PhuongXa,new SelectList(ViewData["PhuongXa"] as IEnumerable<ProjectDeal.Models.PhuongXa>,"MaPhuongXa","TenPhuongXa"),"Chọn phường xã")
                              </div>
                            </div>
                            <div class="control-group">
                              <label class="control-label"> Số Nhà - Ngõ - Ngách:</label>
                              <div class="controls">
                             
                                  @Html.TextBoxFor(m => m.SoNha, new {@class="input-xlarge" })
                              </div>
                            </div>
                            <div class="control-group">
                              <label class="control-label"> Đường:</label>
                              <div class="controls">
                                 @Html.TextBoxFor(m => m.Duong, new {@class="input-xlarge" })
                              </div>
                            </div>
                            <div class="control-group">
                              <label class="control-label"> Lầu:</label>
                              <div class="controls">
                              
                               @Html.TextBoxFor(m => m.Lau, new {@class="input-xlarge" })
                              </div>
                            </div>
                            <div class="control-group">
                              <label class="control-label"> Điện Thoại:</label>
                              <div class="controls">
                                @Html.TextBoxFor(m => m.DienThoai, new {@class="input-xlarge" })
                              </div>
                            </div>
                          </fieldset>
                        </div>
                        <div class="pull-right">
                          <input type="submit" class="submit" value="Continue">
                        </div>
                            @Html.HiddenFor(m=>m.NgayDangKy)
                            @Html.HiddenFor(m => m.NgayThayDoi)
                        }
                    </section>
                </div>
